package com.iweb.order.service;

import com.iweb.order.Dao.OrderDao;
import com.iweb.order.Dao.OrderDaoImpl;
import com.iweb.order.model.Order;
import com.iweb.shopping.model.Address_sh;
import com.iweb.shopping.model.Goods;
import com.iweb.util.PageModel;

import java.util.List;

public class OrderServiceImpl implements OrderService{
    OrderDao orderDao = new OrderDaoImpl();
    @Override
    public List<Order> selectByPage(PageModel pageModel, Integer userid) {
        return orderDao.selectByPage(pageModel,userid);
    }

    @Override
    public int deleteOne(Integer orderid) {
        return orderDao.deleteOne(orderid);
    }

    @Override
    public Goods selectByGoodsid(Integer goodsid) {
        return orderDao.selectByGoodsid(goodsid);
    }

    @Override
    public Address_sh selectByaddress(String address) {
        return orderDao.selectByaddress(address);
    }

    @Override
    public int saveOne(Order order) {
        return orderDao.saveOne(order);
    }
}
